package cn.tannn.lottery.entity;

import java.util.Objects;

/**
 * 用户
 *
 * @author tn
 * @version 1
 * @date 2022-01-21 22:33
 */
public class User {
    private String phone, username,no;


    public User() {
    }

    public User(String phone, String username, String no) {
        this.phone = phone;
        this.username = username;
        this.no = no;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    @Override
    public String toString() {
        return "User{" +
                "phone='" + phone + '\'' +
                ", userName='" + username + '\'' +
                ", no='" + no + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        User user = (User) o;
        return Objects.equals(phone, user.phone) && Objects.equals(username, user.username) && Objects.equals(no, user.no);
    }

    @Override
    public int hashCode() {
        return Objects.hash(phone, username, no);
    }
}
